package com.cecil.generate.domain;

import com.google.common.base.CaseFormat;
import lombok.Data;

@Data
public class Column {

    /**
     * 字段名
     */
    private String field;
    /**
     * 字段类型
     */
    private String type;
    /**
     * 备注
     */
    private String comment;

    private String javaType;

    private String javaName;

    public void setField(String field) {
        this.field = field;
        this.javaName = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, field);
    }

}
